<include file="Public:head"/>

<link rel="stylesheet" href="{lanrain::STATICS}/kindeditor/themes/default/default.css" />
<link rel="stylesheet" href="{lanrain::STATICS}/kindeditor/plugins/code/prettify.css" />
<script src="{lanrain::STATICS}/kindeditor/kindeditor.js" type="text/javascript"></script>
<script src="{lanrain::STATICS}/kindeditor/lang/zh_CN.js" type="text/javascript"></script>
<script src="{lanrain::STATICS}/kindeditor/plugins/code/prettify.js" type="text/javascript"></script>
<script>
	KindEditor.ready(function(K){
		var editor = K.editor({
			allowFileManager:true
		});
		K('#upload').click(function() {
			editor.loadPlugin('image', function() {
				editor.plugin.imageDialog({
					fileUrl : K('#logo').val(),
					clickFn : function(url, title) {
						if(url.indexOf("http") > -1){
							K('#logo').val(url);
						}else{
							K('#logo').val('__ROOT__'+url);
						}
						editor.hideDialog();
						$('#logo').focus();
					}
				});
			});
		});
	});
</script>

<div class="content" style="width:920px; background:none; margin-left:275px; border:none; margin-bottom:30px;" >
	 <div class="cLineB">
		<h4>商家设置 </h4><a href="index.php?ac=card-list&amp;id=9878" class="right btnGrayS vm" style="margin-top:-27px">返回</a>
	 </div>  
	<div class="msgWrap bgfc">	 
		<table class="userinfoArea" style=" margin:0;" border="0" cellspacing="0" cellpadding="0" width="100%">
			<form action="" method="post">
			<tbody>
				<tr>
					<td width="500px" rowspan="4" valign="top">商家简介：<br>
						<textarea class="px" id="info" name="info" style="width: 450px; height: 230px; ">{lanrain:$info.info}</textarea>
					</td>
					<td valign="top">商家logo外链地址(图片尺寸100x100)<br>
						<input type="input" class="px" id="logo" name="logo" value="{lanrain:$info.logo}" style="width:250px;" onblur="document.getElementById('cardlogo').src=document.getElementById('logo').value;">
						<span class="ke-button-common" id="upload" style="margin-top: 3px;margin-left: 5px;"><input type="button" class="ke-button-common ke-button" value="上传"></span><br />
					</td>
					<td rowspan="4" valign="top">&nbsp;</td>
					<td rowspan="4" valign="top"><img id="cardlogo" class="logo" src="{lanrain:$info.logo}" width="100px" height="100px"></td>
				</tr>
				<tr>
				<td valign="top">选择分类：<br>
					<label for="select"></label>
					<select name="class" id="select">
					<option value="1">美食餐饮</option>
					<option value="2">休闲娱乐</option>
					<option value="3">生活服务</option>
					<option value="4">其他</option>
					</select>
				</td>
				</tr>
				<tr>
					<td valign="top">会员卡优惠简短描述：（12个字以内）<br>
					<input name="description" type="input"  class="px" id="logo2" style="width:250px;" onblur="document.getElementById('cardlogo').src=document.getElementById('logo').value;" value="{lanrain:$info.description}"></td>
				</tr>
				<tr>
					<td valign="top">消费确认密码：<br>
					<input type="input" class="px" id="title" value="{lanrain:$info.password}" name="password" style="width:150px;">
					<br>
					商家用来确认用户代金券，优惠券和礼品券使用的密码</td>
				</tr>
					 <tbody>
			 <tr>
				<td colspan="5" class="norightborder">
					<button type="submit" name="batchsubmit" value="true" class="btnGreen vm"><strong>保存</strong></button>
				</td>
			 </tr>
		</tbody>
			</tbody>
			</form>
		</table>
	</div> 
	<div class="cLineB" style="display:none">
		<h4>添加联系方式 <span class="FAQ">设置商家地址及联系电话。<a name="linkinfo"></a></span></h4>
	</div>
      		 
 <div class="msgWrap form" style="display:none">
<div class="bdrcontent">
	
	<div id="div_ptype">
	
	<table class="ListProduct" border="0" cellspacing="0" cellpadding="0" width="100%">
	 <form action="{lanrain::U('Member_card/Contact')}" method="post">  
		<thead>
			<tr>
				<th>区域名称</th>
				<th>详细地址</th>
				<th>联系电话</th>
				<th style=" width:70px;">显示顺序</th>
				<th style=" width:100px;" class="norightborder">操作</th>
			</tr>
		</thead>			
		<tbody>
			<tr>
				<td><input type="text" name="cname" value="" class="px" style="width:100px;"></td>
				<td><input type="text" name="info" value="" class="px" style="width:350px;"></td>
				<td><input type="text" name="tel" value="" class="px" style="width:150px;"></td>
				<td><input type="text" name="sort" value="" class="px" style="width:50px;"></td>
				<td class="norightborder"><button type="submit" class="btnGray vm"><strong>添加</strong></button></td>
			</tr>
		 </tbody>
		 	<tbody>
			<tr>
				<td rowssapn="5">
					<div class="cLineB">
						<h4>联系方式管理 <span class="FAQ">可编辑设置商家地址及联系电话。</span></h4>
					</div>				
				</td>
				
			</tr>
		 </tbody>
		<thead>
			<tr>
				<th>区域名称</th>
				<th>详细地址</th>
				<th>联系电话</th>
				<th style=" width:70px;">显示顺序</th>
				<th style=" width:100px;" class="norightborder">操作</th>
			</tr>
		</thead>		
		 </form>
		<volist id="contact" name="contact">
			<tbody>
				 <form action="{lanrain::U('Member_card/contact_edit')}" method="post">  
				<tr>
					<td><input type="text" name="cname" value="{lanrain:$contact.cname}" class="px" style="width:100px;"></td>
					<td><input type="text" name="info" value="{lanrain:$contact.info}" class="px" style="width:350px;"></td>
					<td><input type="text" name="tel" value="{lanrain:$contact.tel}" class="px" style="width:150px;"></td>
					<td>
						<input type="text" name="sort" value="{lanrain:$contact.sort}" class="px" style="width:50px;">
						<input type="hidden" name="id" value="{lanrain:$contact.id}" class="px" style="width:50px;">
					</td>					
					<td class="norightborder"><button type="submit" class="btnGreen vm"><strong>修改</strong></button></td>
				</tr>
				</form>
			</tbody>
		</volist>
	 
	</table>
	</div>
	
</div>
<div class="footactions" style="padding-left:10px">
  <div class="pages"></div>
</div>

<script>
function addrow(tbody) {
	var add = false;
	var newnode;
	if($(tbody).rows.length == 1 && $(tbody).rows[0].style.display == 'none') {
		$(tbody).rows[0].style.display = '';
		newnode = $(tbody).rows[0];
	} else {
		newnode = $(tbody).rows[0].cloneNode(true);
		add = true;
	}
	if(add) {
		$(tbody).appendChild(newnode);
	}
}
function delrow(obj, tbody) {
	if($(tbody).rows.length == 1) {
		var trobj = obj.parentNode.parentNode;
		trobj.style.display='none';
	} else {
		$(tbody).removeChild(obj.parentNode.parentNode);
	}
}


</script>



 
   
        </div>
  
  
        </div>
		<include file="Public:footer"/>